var t1=t2=t3=t4=t5=t6=t7=t8=t9=t10=t11=t12=0,t13=1;
var pass;

//用户注册验证

function userdate(tt) {
	if (tt.match(/^1\d[0-9]{9}$/g) || tt.match(/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/)) {
		t1=1;
		document.getElementById('erroruser').innerText = "";
		
	} else {
		t1=0;
		document.getElementById('erroruser').innerText = "请输入有效的邮箱地址/手机号";
	}
};

function psdate(tt) {
	pass = tt;
	if (tt.match(/^[a-z0-9_-]{6,18}$/)) {
		t2=1;
		document.getElementById('errorps').innerText = "";
	} else {
		t2=0;
		document.getElementById('errorps').innerText = "密码不能少于6位";
	}
};

function ps2date(tt) {

	if (tt == pass) {
		t3=1;
		document.getElementById('errorps2').innerText = "";
	} else {
		t3=0;
		document.getElementById('errorps2').innerText = "两次密码输入需一致";
	}
};

function namedate(tt) {
	if (tt != "") {
		t4=1;
		document.getElementById('errorname').innerText = "";
	} else {
		t4=0;
		document.getElementById('errorname').innerText = "姓名不能为空";
	}
};

function birthdate(tt) {
	if (tt != "") {
		t5=1;
		document.getElementById('errorbirth').innerText = "";
	} else {
		t5=0;
		document.getElementById('errorbirth').innerText = "请填写你的出生日期";
	}
};

function schooldate(tt) {
	if (tt != "") {
		t6=1;
		document.getElementById('errorschool').innerText = "";
	} else {
		t6=0;
		document.getElementById('errorschool').innerText = "学校不能为空";
	}
};

function prodate(tt) {
	if (tt != "") {
		t7=1;
		document.getElementById('errorpro').innerText = "";
	} else {
		t7=0;
		document.getElementById('errorpro').innerText = "专业不能为空";
	}
};

function degreedate(tt) {

	if (tt != "请选择") {
		t8=1;
		document.getElementById('errordegree').innerText = "";
	} else {
		t8=0;
		document.getElementById('errordegree').innerText = "请选择您的学历";
	}
};


function phonedate(tt) {
	if (tt.match(/^1\d[0-9]{9}$/g)) {
		t9=1;
		document.getElementById('errorphone').innerText = "";
	} else {
		t9=0;
		document.getElementById('errorphone').innerText = "请输入有效的手机号";
	}
};

function emaildate(tt) {
	if (tt.match(/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/)) {
		t10=1;
		document.getElementById('erroremail').innerText = "";
	} else {
		t10=0;
		document.getElementById('erroremail').innerText = "请输入有效的邮箱";
	}
};

function salarydate(tt) {
	if (tt != "请选择") {
		t11=1;
		document.getElementById('errorsalary').innerText = "";
	} else {
		t11=0;
		document.getElementById('errorsalary').innerText = "请选择您的期望薪资";
	}
};

function timedate(tt) {
	if (tt != "") {
		t12=1;
		document.getElementById('errortime').innerText = "";
	} else {
		t12=0;
		document.getElementById('errortime').innerText = "请填写你的到岗时间";
	}
};
function check() {
	var oFile = document.getElementById('avatar_file');
	if (oFile.value == "") {
		alert('请选择图片进行上传！');
		return false;
	}
	if(t1==1 && t2==1&& t3==1&& t4==1&& t5==1&& t6==1&& t7==1&& t8==1&& t9==1&& t10==1&& t11==1&& t12==1){
		return true;
	}else{
		alert("请填写好完整信息后在提交");
		return false;
	}

};
//企业注册验证


function cuserdate(tt) {
	if (tt.match(/^1\d[0-9]{9}$/g) || tt.match(/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/)) {
		t1=1;
		document.getElementById('cerroruser').innerText = "";
		
	} else {
		t1=0;
		document.getElementById('cerroruser').innerText = "请输入有效的邮箱地址/手机号";
	}
};

function cpsdate(tt) {
	pass = tt;
	if (tt.match(/^[a-z0-9_-]{6,18}$/)) {
		t2=1;
		document.getElementById('cerrorps').innerText = "";
	} else {
		t2=0;
		document.getElementById('cerrorps').innerText = "密码不能少于6位";
	}
};

function cps2date(tt) {

	if (tt == pass) {
		t3=1;
		document.getElementById('cerrorps2').innerText = "";
	} else {
		t3=0;
		document.getElementById('cerrorps2').innerText = "两次密码输入需一致";
	}
};

function cnamedate(tt) {
	if (tt != "") {
		t4=1;
		document.getElementById('cerrorname').innerText = "";
	} else {
		t4=0;
		document.getElementById('cerrorname').innerText = "姓名不能为空";
	}
};

function titledate(tt) {
	if (tt != "") {
		t5=1;
		document.getElementById('errortitle').innerText = "";
	} else {
		t5=0;
		document.getElementById('errortitle').innerText = "标题不能为空";
	}
};
function companydate(tt) {

	if (tt != "请选择") {
		t6=1;
		document.getElementById('errorcom').innerText = "";
	} else {
		t6=0;
		document.getElementById('errorcom').innerText = "请选择类型";
	}
};
function guimodate(tt) {

	if (tt != "请选择") {
		t7=1;
		document.getElementById('errorguimo').innerText = "";
	} else {
		t7=0;
		document.getElementById('errorguimo').innerText = "请选择类型";
	}
};





function cphonedate(tt) {
	if (tt.match(/^1\d[0-9]{9}$/g)) {
		t8=1;
		document.getElementById('cerrorphone').innerText = "";
	} else {
		t8=0;
		document.getElementById('cerrorphone').innerText = "请输入有效的手机号";
	}
};

function cemaildate(tt) {
	if (tt.match(/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/)) {
		t9=1;
		document.getElementById('cerroremail').innerText = "";
	} else {
		t9=0;
		document.getElementById('cerroremail').innerText = "请输入有效的邮箱";
	}
};
function addressdate(tt) {
	if (tt != "") {
		t10=1;
		document.getElementById('errorad').innerText = "";
	} else {
		t10=0;
		document.getElementById('errorad').innerText = "不能为空";
	}
};


function check1() {
	var oFile = document.getElementById('avatar_file1');
	if (oFile.value == "") {
		alert('请选择图片进行上传！');
		return false;
	}
	if(t1==1 && t2==1&& t3==1&& t4==1&& t5==1&& t6==1&& t7==1&& t8==1&& t9==1&& t10==1){
		return true;
	}else{
		alert("请填写好完整信息后在提交");
		return false;
	}

};
function check2() {
	if(t1==1 && t2==1){
		return true;
	}else{
		alert("请填写账号密码");
		return false;
	}

};
function check3() {
	if(t1==1 && t2==1){
		return true;
	}else{
		alert("请填写账号密码");
		return false;
	}

};
